﻿// Copyright (c) 2014 Converter Systems LLC

using Opc.Ua;
using System;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Windows.Data;

namespace ConverterSystems.UaBrowser.Data
{
    [ValueConversion(typeof(byte), typeof(String))]
    public class AccessLevelToStringConverter : ValueConverter<byte, String>
    {
        protected override String Convert(byte value, object parameter, CultureInfo culture)
        {
            return (value & AccessLevels.CurrentWrite) == AccessLevels.CurrentWrite ? "{ get; set; }" : "{ get; }";
        }
    }
}